<table cellspacing="0" cellpadding="0">
    <thead>
        <tr>
            <th><?=lang('reviews.total_score')?></th>
            <th><?=lang('reviews.leave_comment')?></th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>

                <div class="big_score"><?= $object->avg_reviews_score; ?><span>/10</span></div>

            </td>

            <td>
                <form id="review_form" method="post" action="<?=  base_url('main/submit_review')?>">

                    <input type="hidden" name="object_ID" value="<?= $object->object_ID ?>" />

                    <div class="i_line clearfix">
                        <div class="i_title"><?=lang('reviews.name')?>:</div>
                        <div class="i_elem"><input type="text" name="f_name" id="f_name" /></div>
                    </div>
                    <div class="i_line clearfix">
                        <div class="i_title"><?=lang('reviews.surname')?>:</div>
                        <div class="i_elem"><input type="text" name="l_name" id="l_name" /></div>
                    </div>
                    <div class="i_line clearfix">
                        <div class="i_title"><?=lang('reviews.score')?>:</div>
                        <div class="i_elem">
                            <select  name="score" id="score">
                                <? for($i=5; $i <= 10.00; $i+=0.1): ?>
                                <option value="<?= number_format($i,1) ?>"><?=  lang((string)number_format($i,1) )?>, <?= number_format($i,1) ?></option>
                                    <? endfor; ?>
                            </select>
                        </div>
                    </div>
                    <div class="i_line clearfix">
                        <div class="i_title"><?=lang('reviews.comment')?>:</div>
                        <div class="i_elem"><textarea name="comments" id="comments"></textarea> </div>
                    </div>
                    <div class="i_line clearfix">
                        <a href="javascript:" id="sub_reviews" class="btn"><?=lang('reviews.submit')?></a>
                    </div>
                </form>
            </td>
        </tr>
    </tbody>
</table>

<h3><?=lang('reviews.comments')?></h3>
<br>

<? foreach($object->all_reviews as $review): ?>

        <div class="one_comment clearfix">

            <div class="ccol--1"><?= $review->score ?></div>

            <div class="ccol-1">

                <div class="f_l_name"><?= $review->name ?></br><?= $review->surname ?></div>
                <div class="date"><?= date('d.m.Y', $review->datetime); ?></div>

            </div>

            <div class="ccol-2"><?= $review->comment ?></div>

        </div>

    <? endforeach; ?>
